#!/bin/bash

# Create directories if they don't exist
mkdir -p android/app/src/main/res/drawable
mkdir -p android/app/src/main/res/mipmap-hdpi
mkdir -p android/app/src/main/res/mipmap-mdpi
mkdir -p android/app/src/main/res/mipmap-xhdpi
mkdir -p android/app/src/main/res/mipmap-xxhdpi
mkdir -p android/app/src/main/res/mipmap-xxxhdpi

# Copy launch image
cp assets/icon/app_icon_foreground.png android/app/src/main/res/drawable/launch_image.png

# Copy app icon to different resolutions
cp assets/icon/app_icon.png android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
cp assets/icon/app_icon.png android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
cp assets/icon/app_icon.png android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
cp assets/icon/app_icon.png android/app/src/main/res/mipmap-mdpi/ic_launcher.png
cp assets/icon/app_icon.png android/app/src/main/res/mipmap-hdpi/ic_launcher.png

# Copy for iOS
mkdir -p ios/Runner/Assets.xcassets/LaunchImage.imageset
cp assets/icon/app_icon_foreground.png ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png

# Copy app icon for iOS
mkdir -p ios/Runner/Assets.xcassets/AppIcon.appiconset
cp assets/icon/app_icon.png ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png 